using System;
using System.Data;
using System.Data.SqlClient;

using EntLibEC.Cmn;
using EntLibEC.Info.Basic;

namespace EntLibEC.Dac.Basic
{
	/// <summary>
	/// Summary description for ASPDac.
	/// </summary>
	public class ASPDac
	{
		
		public ASPDac()
		{
		}
		public int InsertArea(AreaInfo oParam)
		{
			string sql = @"INSERT INTO Ent_Area
                            (
                            SysNo, ProvinceSysNo, CitySysNo, 
                            ProvinceName, CityName, DistrictName, IsLocal, Status
                            )
                            VALUES (
                            @SysNo, @ProvinceSysNo, @CitySysNo, 
                            @ProvinceName, @CityName, @DistrictName, @IsLocal, @Status
                            );
							set @sysno = SCOPE_IDENTITY();
						";
			SqlCommand cmd = new SqlCommand(sql);

			SqlParameter paramSysNo = new SqlParameter("@SysNo", SqlDbType.Int,4);
			SqlParameter paramProvinceSysNo = new SqlParameter("@ProvinceSysNo", SqlDbType.Int,4);
			SqlParameter paramCitySysNo = new SqlParameter("@CitySysNo", SqlDbType.Int,4);
			SqlParameter paramProvinceName = new SqlParameter("@ProvinceName", SqlDbType.NVarChar,20);
			SqlParameter paramCityName = new SqlParameter("@CityName", SqlDbType.NVarChar,20);
			SqlParameter paramDistrictName = new SqlParameter("@DistrictName", SqlDbType.NVarChar,200);
			SqlParameter paramIsLocal = new SqlParameter("@IsLocal", SqlDbType.Int,4);
			SqlParameter paramStatus = new SqlParameter("@Status", SqlDbType.Int,4);

			paramSysNo.Value = oParam.SysNo;
			
			if ( oParam.ProvinceSysNo != AppConst.IntNull)
				paramProvinceSysNo.Value = oParam.ProvinceSysNo;
			else
				paramProvinceSysNo.Value = System.DBNull.Value;
			
			if ( oParam.CitySysNo != AppConst.IntNull)
				paramCitySysNo.Value = oParam.CitySysNo;
			else
				paramCitySysNo.Value = System.DBNull.Value;

			paramProvinceName.Value = oParam.ProvinceName;

			if ( oParam.CityName != AppConst.StringNull )
                paramCityName.Value = oParam.CityName;
			else
				paramCityName.Value = System.DBNull.Value;

			if ( oParam.DistrictName != AppConst.StringNull )
				paramDistrictName.Value = oParam.DistrictName;
			else
				paramDistrictName.Value = System.DBNull.Value;

			paramIsLocal.Value = oParam.IsLocal;
			paramStatus.Value = oParam.Status;

			cmd.Parameters.Add(paramSysNo);
			cmd.Parameters.Add(paramProvinceSysNo);
			cmd.Parameters.Add(paramCitySysNo);
			cmd.Parameters.Add(paramProvinceName);
			cmd.Parameters.Add(paramCityName);
			cmd.Parameters.Add(paramDistrictName);
			cmd.Parameters.Add(paramIsLocal);
			cmd.Parameters.Add(paramStatus);

			return SqlHelper.ExecuteNonQuery(cmd);
		}

		public int UpdateArea(AreaInfo oParam)
		{
			string sql = @"UPDATE Ent_Area SET 
                            ProvinceSysNo=@ProvinceSysNo, CitySysNo=@CitySysNo, 
                            ProvinceName=@ProvinceName, CityName=@CityName, 
                            DistrictName=@DistrictName, IsLocal=@IsLocal, Status=@Status
                            WHERE SysNo=@SysNo";
			SqlCommand cmd = new SqlCommand(sql);

			SqlParameter paramSysNo = new SqlParameter("@SysNo", SqlDbType.Int,4);
			SqlParameter paramProvinceSysNo = new SqlParameter("@ProvinceSysNo", SqlDbType.Int,4);
			SqlParameter paramCitySysNo = new SqlParameter("@CitySysNo", SqlDbType.Int,4);
			SqlParameter paramProvinceName = new SqlParameter("@ProvinceName", SqlDbType.NVarChar,20);
			SqlParameter paramCityName = new SqlParameter("@CityName", SqlDbType.NVarChar,20);
			SqlParameter paramDistrictName = new SqlParameter("@DistrictName", SqlDbType.NVarChar,200);
			SqlParameter paramIsLocal = new SqlParameter("@IsLocal", SqlDbType.Int,4);
			SqlParameter paramStatus = new SqlParameter("@Status", SqlDbType.Int,4);

			paramSysNo.Value = oParam.SysNo;
			paramProvinceSysNo.Value = oParam.ProvinceSysNo;
			paramCitySysNo.Value = oParam.CitySysNo;
			paramProvinceName.Value = oParam.ProvinceName;
			paramCityName.Value = oParam.CityName;
			paramDistrictName.Value = oParam.DistrictName;
			paramIsLocal.Value = oParam.IsLocal;
			paramStatus.Value = oParam.Status;

			cmd.Parameters.Add(paramSysNo);
			cmd.Parameters.Add(paramProvinceSysNo);
			cmd.Parameters.Add(paramCitySysNo);
			cmd.Parameters.Add(paramProvinceName);
			cmd.Parameters.Add(paramCityName);
			cmd.Parameters.Add(paramDistrictName);
			cmd.Parameters.Add(paramIsLocal);
			cmd.Parameters.Add(paramStatus);

			return SqlHelper.ExecuteNonQuery(cmd);
		}

		public int InsertPayType(PayTypeInfo oParam)
		{
			string sql = @"INSERT INTO Ent_PayType
                            (
                            SysNo, PayTypeID, PayTypeName, PayTypeDesc, 
                            Period, PaymentPage, PayRate, IsNet, 
                            IsPayWhenRecv, OrderNumber, IsOnlineShow
                            )
                            VALUES (
                            @SysNo, @PayTypeID, @PayTypeName, @PayTypeDesc, 
                            @Period, @PaymentPage, @PayRate, @IsNet, 
                            @IsPayWhenRecv, @OrderNumber, @IsOnlineShow
                            )";
			SqlCommand cmd = new SqlCommand(sql);

			SqlParameter paramSysNo = new SqlParameter("@SysNo", SqlDbType.Int,4);
			SqlParameter paramPayTypeID = new SqlParameter("@PayTypeID", SqlDbType.NVarChar,10);
			SqlParameter paramPayTypeName = new SqlParameter("@PayTypeName", SqlDbType.NVarChar,50);
			SqlParameter paramPayTypeDesc = new SqlParameter("@PayTypeDesc", SqlDbType.NVarChar,500);
			SqlParameter paramPeriod = new SqlParameter("@Period", SqlDbType.NVarChar,50);
			SqlParameter paramPaymentPage = new SqlParameter("@PaymentPage", SqlDbType.NVarChar,100);
			SqlParameter paramPayRate = new SqlParameter("@PayRate", SqlDbType.Decimal,9);
			SqlParameter paramIsNet = new SqlParameter("@IsNet", SqlDbType.Int,4);
			SqlParameter paramIsPayWhenRecv = new SqlParameter("@IsPayWhenRecv", SqlDbType.Int,4);
			SqlParameter paramOrderNumber = new SqlParameter("@OrderNumber", SqlDbType.NVarChar,10);
			SqlParameter paramIsOnlineShow = new SqlParameter("@IsOnlineShow", SqlDbType.Int,4);

			paramSysNo.Value = oParam.SysNo;
			paramPayTypeID.Value = oParam.PayTypeID;
			paramPayTypeName.Value = oParam.PayTypeName;
			paramPayTypeDesc.Value = oParam.PayTypeDesc;
			paramPeriod.Value = oParam.Period;
			paramPaymentPage.Value = oParam.PaymentPage;
			paramPayRate.Value = oParam.PayRate;
			paramIsNet.Value = oParam.IsNet;
			paramIsPayWhenRecv.Value = oParam.IsPayWhenRecv;
			paramOrderNumber.Value = oParam.OrderNumber;
			paramIsOnlineShow.Value = oParam.IsOnlineShow;

			cmd.Parameters.Add(paramSysNo);
			cmd.Parameters.Add(paramPayTypeID);
			cmd.Parameters.Add(paramPayTypeName);
			cmd.Parameters.Add(paramPayTypeDesc);
			cmd.Parameters.Add(paramPeriod);
			cmd.Parameters.Add(paramPaymentPage);
			cmd.Parameters.Add(paramPayRate);
			cmd.Parameters.Add(paramIsNet);
			cmd.Parameters.Add(paramIsPayWhenRecv);
			cmd.Parameters.Add(paramOrderNumber);
			cmd.Parameters.Add(paramIsOnlineShow);
            cmd.Parameters.AddWithValue("@MerchantID", oParam.MerchantID);
            cmd.Parameters.AddWithValue("@PrivateKey", oParam.PrivateKey);

			return SqlHelper.ExecuteNonQuery(cmd);
		}

		public int UpdatePayType(PayTypeInfo oParam)
		{
			string sql = @"UPDATE Ent_PayType SET 
                            PayTypeID=@PayTypeID, 
                            PayTypeName=@PayTypeName, PayTypeDesc=@PayTypeDesc, 
                            Period=@Period, PaymentPage=@PaymentPage, 
                            PayRate=@PayRate, IsNet=@IsNet, 
                            IsPayWhenRecv=@IsPayWhenRecv, OrderNumber=@OrderNumber, 
                            IsOnlineShow=@IsOnlineShow,
                            MerchantID=@MerchantID,
                            PrivateKey=@PrivateKey
                            WHERE SysNo=@SysNo";
			SqlCommand cmd = new SqlCommand(sql);

			SqlParameter paramSysNo = new SqlParameter("@SysNo", SqlDbType.Int,4);
			SqlParameter paramPayTypeID = new SqlParameter("@PayTypeID", SqlDbType.NVarChar,10);
			SqlParameter paramPayTypeName = new SqlParameter("@PayTypeName", SqlDbType.NVarChar,50);
			SqlParameter paramPayTypeDesc = new SqlParameter("@PayTypeDesc", SqlDbType.NVarChar,500);
			SqlParameter paramPeriod = new SqlParameter("@Period", SqlDbType.NVarChar,50);
			SqlParameter paramPaymentPage = new SqlParameter("@PaymentPage", SqlDbType.NVarChar,100);
			SqlParameter paramPayRate = new SqlParameter("@PayRate", SqlDbType.Decimal,9);
			SqlParameter paramIsNet = new SqlParameter("@IsNet", SqlDbType.Int,4);
			SqlParameter paramIsPayWhenRecv = new SqlParameter("@IsPayWhenRecv", SqlDbType.Int,4);
			SqlParameter paramOrderNumber = new SqlParameter("@OrderNumber", SqlDbType.NVarChar,10);
			SqlParameter paramIsOnlineShow = new SqlParameter("@IsOnlineShow", SqlDbType.Int,4);

			paramSysNo.Value = oParam.SysNo;
			paramPayTypeID.Value = oParam.PayTypeID;
			paramPayTypeName.Value = oParam.PayTypeName;
			paramPayTypeDesc.Value = oParam.PayTypeDesc;
			paramPeriod.Value = oParam.Period;
			paramPaymentPage.Value = oParam.PaymentPage;
			paramPayRate.Value = oParam.PayRate;
			paramIsNet.Value = oParam.IsNet;
			paramIsPayWhenRecv.Value = oParam.IsPayWhenRecv;
			paramOrderNumber.Value = oParam.OrderNumber;
			paramIsOnlineShow.Value = oParam.IsOnlineShow;

			cmd.Parameters.Add(paramSysNo);
			cmd.Parameters.Add(paramPayTypeID);
			cmd.Parameters.Add(paramPayTypeName);
			cmd.Parameters.Add(paramPayTypeDesc);
			cmd.Parameters.Add(paramPeriod);
			cmd.Parameters.Add(paramPaymentPage);
			cmd.Parameters.Add(paramPayRate);
			cmd.Parameters.Add(paramIsNet);
			cmd.Parameters.Add(paramIsPayWhenRecv);
			cmd.Parameters.Add(paramOrderNumber);
			cmd.Parameters.Add(paramIsOnlineShow);
            cmd.Parameters.AddWithValue("@MerchantID", oParam.MerchantID);
            cmd.Parameters.AddWithValue("@PrivateKey", oParam.PrivateKey);

			return SqlHelper.ExecuteNonQuery(cmd);
		}

		public int InsertShipType(ShipTypeInfo oParam)
		{
			string sql = @"INSERT INTO Ent_ShipType
                            (
                            SysNo, ShipTypeID, ShipTypeName, ShipTypeDesc, 
                            Period, Provider, PremiumRate, PremiumBase, 
                            FreeShipBase, OrderNumber, IsOnlineShow, IsWithPackFee
                            )
                            VALUES (
                            @SysNo, @ShipTypeID, @ShipTypeName, @ShipTypeDesc, 
                            @Period, @Provider, @PremiumRate, @PremiumBase, 
                            @FreeShipBase, @OrderNumber, @IsOnlineShow, @IsWithPackFee
                            )";
			SqlCommand cmd = new SqlCommand(sql);

			SqlParameter paramSysNo = new SqlParameter("@SysNo", SqlDbType.Int,4);
			SqlParameter paramShipTypeID = new SqlParameter("@ShipTypeID", SqlDbType.NVarChar,20);
			SqlParameter paramShipTypeName = new SqlParameter("@ShipTypeName", SqlDbType.NVarChar,50);
			SqlParameter paramShipTypeDesc = new SqlParameter("@ShipTypeDesc", SqlDbType.NVarChar,500);
			SqlParameter paramPeriod = new SqlParameter("@Period", SqlDbType.NVarChar,50);
			SqlParameter paramProvider = new SqlParameter("@Provider", SqlDbType.NVarChar,50);
			SqlParameter paramPremiumRate = new SqlParameter("@PremiumRate", SqlDbType.Decimal,9);
			SqlParameter paramPremiumBase = new SqlParameter("@PremiumBase", SqlDbType.Decimal,9);
			SqlParameter paramFreeShipBase = new SqlParameter("@FreeShipBase", SqlDbType.Decimal,9);
			SqlParameter paramOrderNumber = new SqlParameter("@OrderNumber", SqlDbType.NVarChar,10);
			SqlParameter paramIsOnlineShow = new SqlParameter("@IsOnlineShow", SqlDbType.Int,4);
			SqlParameter paramIsWithPackFee = new SqlParameter("@IsWithPackFee", SqlDbType.Int,4);

			paramSysNo.Value = oParam.SysNo;
			paramShipTypeID.Value = oParam.ShipTypeID;
			paramShipTypeName.Value = oParam.ShipTypeName;
			paramShipTypeDesc.Value = oParam.ShipTypeDesc;
			paramPeriod.Value = oParam.Period;
			paramProvider.Value = oParam.Provider;
			paramPremiumRate.Value = oParam.PremiumRate;
			paramPremiumBase.Value = oParam.PremiumBase;
			paramFreeShipBase.Value = oParam.FreeShipBase;
			paramOrderNumber.Value = oParam.OrderNumber;
			paramIsOnlineShow.Value = oParam.IsOnlineShow;
			paramIsWithPackFee.Value = oParam.IsWithPackFee;

			cmd.Parameters.Add(paramSysNo);
			cmd.Parameters.Add(paramShipTypeID);
			cmd.Parameters.Add(paramShipTypeName);
			cmd.Parameters.Add(paramShipTypeDesc);
			cmd.Parameters.Add(paramPeriod);
			cmd.Parameters.Add(paramProvider);
			cmd.Parameters.Add(paramPremiumRate);
			cmd.Parameters.Add(paramPremiumBase);
			cmd.Parameters.Add(paramFreeShipBase);
			cmd.Parameters.Add(paramOrderNumber);
			cmd.Parameters.Add(paramIsOnlineShow);
			cmd.Parameters.Add(paramIsWithPackFee);

			return SqlHelper.ExecuteNonQuery(cmd);
		}
		public int UpdateShipType(ShipTypeInfo oParam)
		{
			string sql = @"UPDATE Ent_ShipType SET 
                            ShipTypeID=@ShipTypeID, 
                            ShipTypeName=@ShipTypeName, ShipTypeDesc=@ShipTypeDesc, 
                            Period=@Period, Provider=@Provider, 
                            PremiumRate=@PremiumRate, PremiumBase=@PremiumBase, 
                            FreeShipBase=@FreeShipBase, OrderNumber=@OrderNumber, 
                            IsOnlineShow=@IsOnlineShow, IsWithPackFee=@IsWithPackFee
                            WHERE SysNo=@SysNo";
			SqlCommand cmd = new SqlCommand(sql);

			SqlParameter paramSysNo = new SqlParameter("@SysNo", SqlDbType.Int,4);
			SqlParameter paramShipTypeID = new SqlParameter("@ShipTypeID", SqlDbType.NVarChar,20);
			SqlParameter paramShipTypeName = new SqlParameter("@ShipTypeName", SqlDbType.NVarChar,50);
			SqlParameter paramShipTypeDesc = new SqlParameter("@ShipTypeDesc", SqlDbType.NVarChar,500);
			SqlParameter paramPeriod = new SqlParameter("@Period", SqlDbType.NVarChar,50);
			SqlParameter paramProvider = new SqlParameter("@Provider", SqlDbType.NVarChar,50);
			SqlParameter paramPremiumRate = new SqlParameter("@PremiumRate", SqlDbType.Decimal,9);
			SqlParameter paramPremiumBase = new SqlParameter("@PremiumBase", SqlDbType.Decimal,9);
			SqlParameter paramFreeShipBase = new SqlParameter("@FreeShipBase", SqlDbType.Decimal,9);
			SqlParameter paramOrderNumber = new SqlParameter("@OrderNumber", SqlDbType.NVarChar,10);
			SqlParameter paramIsOnlineShow = new SqlParameter("@IsOnlineShow", SqlDbType.Int,4);
			SqlParameter paramIsWithPackFee = new SqlParameter("@IsWithPackFee", SqlDbType.Int,4);

			paramSysNo.Value = oParam.SysNo;
			paramShipTypeID.Value = oParam.ShipTypeID;
			paramShipTypeName.Value = oParam.ShipTypeName;
			paramShipTypeDesc.Value = oParam.ShipTypeDesc;
			paramPeriod.Value = oParam.Period;
			paramProvider.Value = oParam.Provider;
			paramPremiumRate.Value = oParam.PremiumRate;
			paramPremiumBase.Value = oParam.PremiumBase;
			paramFreeShipBase.Value = oParam.FreeShipBase;
			paramOrderNumber.Value = oParam.OrderNumber;
			paramIsOnlineShow.Value = oParam.IsOnlineShow;
			paramIsWithPackFee.Value = oParam.IsWithPackFee;

			cmd.Parameters.Add(paramSysNo);
			cmd.Parameters.Add(paramShipTypeID);
			cmd.Parameters.Add(paramShipTypeName);
			cmd.Parameters.Add(paramShipTypeDesc);
			cmd.Parameters.Add(paramPeriod);
			cmd.Parameters.Add(paramProvider);
			cmd.Parameters.Add(paramPremiumRate);
			cmd.Parameters.Add(paramPremiumBase);
			cmd.Parameters.Add(paramFreeShipBase);
			cmd.Parameters.Add(paramOrderNumber);
			cmd.Parameters.Add(paramIsOnlineShow);
			cmd.Parameters.Add(paramIsWithPackFee);

			return SqlHelper.ExecuteNonQuery(cmd);
		}

		public int InsertShipArea(ShipAreaInfo oParam)
		{
			string sql = @"INSERT INTO Ent_ShipType_Area_Un
                            (
                            ShipTypeSysNo, AreaSysNo
                            )
                            VALUES (
                            @ShipTypeSysNo, @AreaSysNo
                            );
							set @SysNo = SCOPE_IDENTITY();";
			SqlCommand cmd = new SqlCommand(sql);

			SqlParameter paramSysNo = new SqlParameter("@SysNo", SqlDbType.Int,4);
			SqlParameter paramShipTypeSysNo = new SqlParameter("@ShipTypeSysNo", SqlDbType.Int,4);
			SqlParameter paramAreaSysNo = new SqlParameter("@AreaSysNo", SqlDbType.Int,4);

			paramSysNo.Direction = ParameterDirection.Output;
			paramShipTypeSysNo.Value = oParam.ShipTypeSysNo;
			paramAreaSysNo.Value = oParam.AreaSysNo;

			cmd.Parameters.Add(paramSysNo);
			cmd.Parameters.Add(paramShipTypeSysNo);
			cmd.Parameters.Add(paramAreaSysNo);

			return SqlHelper.ExecuteNonQuery(cmd, out oParam.SysNo);
		}
		public int DeleteShipArea(int paramSysNo)
		{
			string sql = "delete from Ent_ShipType_Area_Un where sysno =" + paramSysNo;
			SqlCommand cmd = new SqlCommand(sql);
			return SqlHelper.ExecuteNonQuery(cmd);
		}
		public int InsertShipPay(ShipPayInfo oParam)
		{
			string sql = @"INSERT INTO Ent_ShipType_PayType_Un
                            (
                            ShipTypeSysNo, PayTypeSysNo
                            )
                            VALUES (
                            @ShipTypeSysNo, @PayTypeSysNo
                            );
							set @SysNo = SCOPE_IDENTITY();";

			SqlCommand cmd = new SqlCommand(sql);

			SqlParameter paramSysNo = new SqlParameter("@SysNo", SqlDbType.Int,4);
			SqlParameter paramShipTypeSysNo = new SqlParameter("@ShipTypeSysNo", SqlDbType.Int,4);
			SqlParameter paramPayTypeSysNo = new SqlParameter("@PayTypeSysNo", SqlDbType.Int,4);

			paramSysNo.Direction = ParameterDirection.Output;
			paramShipTypeSysNo.Value = oParam.ShipTypeSysNo;
			paramPayTypeSysNo.Value = oParam.PayTypeSysNo;

			cmd.Parameters.Add(paramSysNo);
			cmd.Parameters.Add(paramShipTypeSysNo);
			cmd.Parameters.Add(paramPayTypeSysNo);

			return SqlHelper.ExecuteNonQuery(cmd, out oParam.SysNo);
		}
		public int DeleteShipPay(int paramSysNo)
		{
			string sql = "delete from Ent_ShipType_PayType_Un where sysno =" + paramSysNo;
			SqlCommand cmd = new SqlCommand(sql);
			return SqlHelper.ExecuteNonQuery(cmd); 
		}

		public int InsertShipAreaPrice(ShipAreaPriceInfo oParam)
		{
			string sql = @"INSERT INTO Ent_ShipType_Area_Price
                            (
                            ShipTypeSysNo, AreaSysNo, BaseWeight, 
                            TopWeight, UnitWeight, UnitPrice, MaxPrice
                            )
                            VALUES (
                            @ShipTypeSysNo, @AreaSysNo, @BaseWeight, 
                            @TopWeight, @UnitWeight, @UnitPrice, @MaxPrice
                            );
							set @SysNo = SCOPE_IDENTITY();";

			SqlCommand cmd = new SqlCommand(sql);

			SqlParameter paramSysNo = new SqlParameter("@SysNo", SqlDbType.Int,4);
			SqlParameter paramShipTypeSysNo = new SqlParameter("@ShipTypeSysNo", SqlDbType.Int,4);
			SqlParameter paramAreaSysNo = new SqlParameter("@AreaSysNo", SqlDbType.Int,4);
			SqlParameter paramBaseWeight = new SqlParameter("@BaseWeight", SqlDbType.Int,4);
			SqlParameter paramTopWeight = new SqlParameter("@TopWeight", SqlDbType.Int,4);
			SqlParameter paramUnitWeight = new SqlParameter("@UnitWeight", SqlDbType.Int,4);
			SqlParameter paramUnitPrice = new SqlParameter("@UnitPrice", SqlDbType.Decimal,9);
			SqlParameter paramMaxPrice = new SqlParameter("@MaxPrice", SqlDbType.Decimal,9);

			paramSysNo.Direction = ParameterDirection.Output;
			paramShipTypeSysNo.Value = oParam.ShipTypeSysNo;
			paramAreaSysNo.Value = oParam.AreaSysNo;
			paramBaseWeight.Value = oParam.BaseWeight;
			paramTopWeight.Value = oParam.TopWeight;
			paramUnitWeight.Value = oParam.UnitWeight;
			paramUnitPrice.Value = oParam.UnitPrice;
			paramMaxPrice.Value = oParam.MaxPrice;

			cmd.Parameters.Add(paramSysNo);
			cmd.Parameters.Add(paramShipTypeSysNo);
			cmd.Parameters.Add(paramAreaSysNo);
			cmd.Parameters.Add(paramBaseWeight);
			cmd.Parameters.Add(paramTopWeight);
			cmd.Parameters.Add(paramUnitWeight);
			cmd.Parameters.Add(paramUnitPrice);
			cmd.Parameters.Add(paramMaxPrice);

			return SqlHelper.ExecuteNonQuery(cmd, out oParam.SysNo);
		}
		public int DeleteShipAreaPrice(int paramSysNo)
		{
			string sql = "delete from Ent_ShipType_Area_Price where sysno =" + paramSysNo;
			SqlCommand cmd = new SqlCommand(sql);
			return SqlHelper.ExecuteNonQuery(cmd);
			
		}
	}
}
